package com.example.springbootgoods.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

@Data
public class Commodity {
    @TableId(type=IdType.AUTO)
    private int cid;    //主键自增
    @TableField("cname")
    private String cname;   //商品名称
    @TableField("classId")
    private int classId;    //类别编号
    @TableField("brandId")
    private int brandId;    //品牌编号
    private float price;    //价格
    private int num;        //库存
    @TableField("typeName")
    private String typeName;    //型号


    @TableField("ClassName")
    private ClassName className;
    private Brand brand;

    @TableField(fill = FieldFill.DEFAULT ,exist = false)
    private int count;
}
